/*
package yunwo.cn.yzstation.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import java.util.List;

import yunwo.cn.yzstation.R;

*/
/**
 * Created by lao on 2017/9/8.
 *//*


public class SaiXuanItemAdapter extends BaseAdapter {
    Context context;
    List<String> list;
    private int selectedPosition = 0;// 选中的位置

    public SaiXuanItemAdapter(Context context, List<String> list) {
        this.context = context;
        this.list = list;
    }
    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public Object getItem(int i) {
        return list.get(i);
    }

    @Override
    public long getItemId(int i) {
        return i;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
         Myhodler mMyhodler;
        if (view == null) {
            mMyhodler = new Myhodler();
            view = LayoutInflater.from(context).inflate(R.layout.item_saixuan, viewGroup, false);
            mMyhodler.mTextView = (TextView) view.findViewById(R.id.itemTV);
            view.setTag(mMyhodler);
        }else {
            mMyhodler = (Myhodler) view.getTag();
        }
        mMyhodler.mTextView.setText(list.get(i));
        return view;
    }

    class Myhodler {
        TextView mTextView;
    }

    public void setSelectedPosition(int position) {
        selectedPosition = position;
    }
}
*/
